#include "game.h"
#include <SFML/Window.hpp>
int main()
{
	// create the window
	
	sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
	World w(window);
	// run the program as long as the window is open
	sf::Clock clock;
	sf::Time dt = sf::Time::Zero;
	while (window.isOpen())
	{
		
		// check all the window's events that were triggered since the last iteration of the loop
		sf::Event event;
		while (window.pollEvent(event))
		{
			// "close requested" event: we close the window
			if (event.type == sf::Event::Closed)
				window.close();
		}

		// clear the window with black color
		window.clear(sf::Color::Black);
		
		w.update(dt);
		w.draw();
		
		// draw everything here...
		// window.draw(...);
		
		// end the current frame
		window.display();
		dt = clock.restart();
	}

	return 0;

	//Game g(800, 600);
	//g.run();
}